import request from "@/utils/request";

// api地址
const api = {
	auth: "/user/identityAuthentication",
	userCenter: "/user/getUserInfo", //个人中心
};

export const userAuth = (data) => {
	return request.post(api.auth, data);
};
export const applyIdentityCheck = (data) => {
	return request.post("/user/applyIdentityCheck", data);
};
// 个人中心
export const getUserInfo = (data) => {
	return request.get(api.userCenter, data);
};

// 排行榜点赞
export const topDz = (data) => {
	return request.post("/ranking/topDz", data);
};

// 排行榜
export const getTopList = (data) => {
	return request.get("/ranking/getTopList", data);
};

// 获取奖金信息
export const getBillInfo = (data) => {
	return request.get("/institution/getBillInfo", data);
};

// 佣金列表（全部、招生、裂变）
export const getBillList = (data) => {
	return request.post("/institution/getBillList", data);
};

// 佣金提现
export const applyWithdrawal = (data) => {
	return request.post("/user/applyWithdrawal", data);
};

// 明细
export const usergetBillList = (data) => {
	return request.post("/user/getBillList", data);
};

// 便捷话语库
export const getScriptList = () => {
	return request.get("/dailyTask/getScriptList");
};

// 指导建议
export const getGuidanceInfo = () => {
	return request.get("/dailyTask/getGuidanceInfo");
};

// 每日/月任务列表
export const getTaskList = (data) => {
	return request.get("/dailyTask/taskList", data);
};

// 任务打卡提交（素材上传）
export const submitTask = (data) => {
	return request.post("/dailyTask/submitTask", data);
};

// 销售数据获取
export const saleStat = (data) => {
	return request.post("/analysis/saleStat", data);
};

// 客户详情统计
export const customStat = (data) => {
	return request.post("/analysis/customStat", data);
};

// 潜在顾客
export const getPotentialCustomers = (data) => {
	return request.get("/analysis/getPotentialCustomers", data);
};


// 访客统计（下）
export const operateStat = () => {
	return request.get("/analysis/operateStat");
};
// 访客统计（上）
export const visitorStat = (data) => {
	return request.get("/analysis/visitorStat", data);
};

// 搜索排名
export const searchTop = (data) => {
	return request.get("/index/searchTop", data);
};

// 首页搜索(研学)
export const searchProject = (data) => {
	return request.post("/index/searchProject", data);
};

// 获取邀请佣金（用户）
export const getInviteInfo = () => {
	return request.get("/user/getInviteInfo");
};

// 素材详情
export const configInfo = (params) => {
	return request.get("/index/configInfo", params);
};

// 信息修改
export const userInfoEdit = (data) => {
	return request.post("/user/userInfoEdit", data);
};